#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#include "uthash.h"

int findTargetSumWays(int* nums, int numsSize, int target);
int target, res;
void dfs(int* nums, int idx, int numsSize, int val);

int main()
{
	return 0;
}

int findTargetSumWays(int* nums, int numsSize, int _target)
{
	target = _target; res = 0;
	dfs(nums, 0, numsSize, 0);
	return res;
}

void dfs(int* nums, int idx, int numsSize, int val) {
	if (idx == numsSize) {
		if (val == target) res++;
		return;
	}
	dfs(nums, idx + 1, numsSize, val + nums[idx]);
	dfs(nums, idx + 1, numsSize, val - nums[idx]);
}
